home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / PAS_0493 / CURSOR1.PAS < prev    next >
Pascal/Delphi Source File  |  1993-04-22  |  1KB  |  35 lines

  1. {─ Fido Pascal Conference ────────────────────────────────────────────── PASCAL ─
  2. Msg  : 439 of 474
  3. From : Sean Palmer                         1:104/123.0          16 Apr 93  14:58
  4. To   : Daniel Shapiro
  5. Subj : Hiding cursor
  6. ────────────────────────────────────────────────────────────────────────────────
  7.  DS>      I have another one- How do I "hide" the cursor?
  8.  DS> So when it is waiting for input, I won't see that stupid little
  9.  DS> blinking cursor there...  }
  10.  
  11. { $TESTED+}  {<<< I like that!!}
  12.  
  13. unit cursor1; {Public domain, by Sean Palmer aka Ghost}
  14.  
  15. interface
  16.  
  17. var maxSize:byte;
  18.  
  19.  procedure setSize(scans:byte);  {set size from bottom, or 0 for off}
  20.  procedure detect;     {get max scan lines by reading current cursor}
  21.  
  22. implementation
  23.  
  24. procedure setSize(scans:byte);var t:byte;begin
  25.  if scans=0 then t:=$20 else t:=maxSize-scans;
  26.  asm mov ah,1; mov bh,0; mov ch,t; mov cl,maxSize; dec cl; int $10; end;
  27.  end;
  28.  
  29. procedure detect;assembler;asm  {do NOT call while cursor's hidden}
  30.  mov ah,3; mov bh,0; int $10; inc cl; mov maxSize,cl;
  31.  end;
  32.  
  33. begin
  34.  detect;
  35.  end.